package DiErZhou.Day1;

public class Day1_3 {
    public static void main(String[] args) {
      //  int sum=0;
       // for (int j = 0; j <= 100; j++) {
         //   if (j%2==0){
          //      sum=sum+j;
         //   }
        //}
       // System.out.println("1到100偶数的和： " + sum);
        int sum=0;
        for (int i = 0; i <= 100; i+=2) {
            sum=sum+i;
        }
        System.out.println("sum = " + sum);
    }
}
